package com.train.system.req.train;

import com.train.common.group.AddGroup;
import com.train.common.group.EditGroup;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class TrainGenerateSeatReq {

    @NotBlank(message = "【车次】不能为空", groups = {AddGroup.class})
    @Pattern(regexp = "^[A-Za-z][0-9]+$",
            message = "【车次】格式错误，必须以字母开头，后面跟一个或多个数字",
            groups = {AddGroup.class})
    private String trainCode;
}
